﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WomanMotion.WebApi.Model.Dtos.Role
{
    /// <summary>
    /// 创建角色DTO
    /// </summary>
    public class CreatedRoleDTO
    {
        /// <summary>
        /// 角色代码
        /// </summary>
        [Required(ErrorMessage = "角色代码不能为空")]
        [MaxLength(10, ErrorMessage = "角色代码不能大于10个字符")]
        [MinLength(3, ErrorMessage = "角色代码不能小于3个字符")]
        public string? Code { get; set; }

        /// <summary>
        /// 角色名字
        /// </summary>
        [Required(ErrorMessage = "角色名字不能为空")]
        [MaxLength(10, ErrorMessage = "角色名字不能大于10个字符")]
        [MinLength(3, ErrorMessage = "角色名字不能小于3个字符")]
        public string? Name { get; set; }

        /// <summary>
        /// 角色权限数组
        /// </summary>
        public string[]? authoritystree { get; set; }
    }
}